Disambiguating heteronyms in speech synthesis

ABSTRACT

Systems and processes for disambiguating heteronyms in speech synthesis are provided. In one example process, a speech input containing a heteronym can be received from a user. The speech input can be processed using an automatic speech recognition system to determine a phonemic string corresponding to the heteronym as pronounced by the user in the speech input. A correct pronunciation of the heteronym can be determined based on at least one of the phonemic string or using an n-gram language model of the automatic speech recognition system. A dialogue response to the speech input can be generated where the dialogue response can include the heteronym. The dialogue response can be outputted as a speech output. The heteronym in the dialogue response can be pronounced in the speech output according to the correct pronunciation.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from U.S. Provisional Ser. No. 62/089,464, filed on Dec. 9, 2014, entitled “Disambiguating Heteronyms in Speech Synthesis,” which is hereby incorporated by reference in its entirety for all purposes.

FIELD

This relates generally to digital assistants and, more specifically, to disambiguating heteronyms in speech synthesis.

BACKGROUND

Intelligent automated assistants (or digital assistants) can provide a beneficial interface between human users and electronic devices. Such assistants can allow users to interact with devices or systems using natural language in spoken and/or text forms. For example, a user can provide a speech input to a digital assistant associated with the electronic device. The digital assistant can interpret the user's intent from the speech input and operationalize the user's intent into tasks. The tasks can then be performed by executing one or more services of the electronic device and a relevant speech output can be returned to the user in natural language form.

Occasionally, speech outputs generated by digital assistants can contain heteronyms. A heteronym can be each of two or more words that are spelled identically but have different pronunciations and meanings. For example, a user can provide a speech input to a digital assistant requesting the weather in Nice, France. The digital assistant can return a relevant speech output such as, “Here is the weather in Nice, France.” In this example, the speech output contains the heteronym “nice,” which can have one pronunciation as a correct noun and a different pronunciation as an adjective. Conventionally, digital assistants can have difficult disambiguating heteronyms and thus speech outputs containing heteronyms can often be pronounced incorrectly. This can result in a poor user experience in interacting with the digital assistant.

SUMMARY

Systems and processes for disambiguating heteronyms in speech synthesis are provided. In an example process, a speech input can be received from a user. The speech input can contain a heteronym and one or more additional words. The speech input can be processed using an automatic speech recognition system to determine at least one of a phonemic string corresponding to the heteronym as pronounced by the user in the speech input and a frequency of occurrence of an n-gram with respect to a corpus. The n-gram can include the heteronym and the one or more additional words and the heteronym in the n-gram can be associated with a first pronunciation. A correct pronunciation of the heteronym can be based on at least one of the phonemic string and the frequency of occurrence of the n-gram. A dialogue response to the speech input can be generated where the dialogue response can include the heteronym. The dialogue response can be output as a speech output. The heteronym in the dialogue response can be pronounced in the speech output according to the determined correct pronunciation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a system and environment for implementing a digital assistant according to various examples.

FIG. 2 illustrates a user device implementing the client-side portion of a digital assistant according to various examples.

FIG. 3A illustrates a digital assistant system or a server portion thereof according to various examples.

FIG. 3B illustrates the functions of the digital assistant shown in FIG. 3A according to various examples.

FIG. 3C illustrates a portion of an ontology according to various examples.

FIG. 4 illustrates a process for operating a digital assistant according to various examples.

FIG. 5 illustrates a functional block diagram of an electronic device according to various examples.

DETAILED DESCRIPTION

In the following description of examples, reference is made to the accompanying drawings in which it is shown by way of illustration specific examples that can be practiced. It is to be understood that other examples can be used and structural changes can be made without departing from the scope of the various examples.

Systems and processes for disambiguating heteronyms in speech synthesis are provided. In one example process, a speech input containing a heteronym can be received from a user. Contextual data associated with the speech input can be received. The speech input can be processed using an automatic speech recognition system to determine a text string corresponding to the speech input. Based on the text string, an actionable intent can be determined using a natural language processor. A dialogue response to the speech input can be generated where the dialogue response can include the heteronym. A correct pronunciation of the heteronym can be determined using an n-gram language model of the automatic speech recognition system or based on at least one of the speech input, the actionable intent, and the contextual data. The dialogue response can be output as a speech output and the heteronym can be pronounced in the speech output according to the correct pronunciation.

By utilizing at least one of the speech input, the n-gram language model, the actionable intent, and the contextual data as a knowledge source for disambiguating heteronyms, the pronunciation of heteronyms in the speech output can be synthesized more accurately, thereby improving user experience. Further, leveraging the automatic speech recognition system and the natural language processor to disambiguate heteronyms can obviate the need to implement additional resources in the speech synthesizer for the same purpose. For example, additional language models need not be implemented in the speech synthesizer to disambiguate heteronyms. This enables digital assistants to operate with greater efficiency and fewer resources.

1. System and Environment

FIG. 1 illustrates a block diagram of a system 100 according to various examples. In some examples, the system 100 can implement a digital assistant. The terms “digital assistant,” “virtual assistant,” “intelligent automated assistant,” or “automatic digital assistant,” can refer to any information processing system that interprets natural language input in spoken and/or textual form to infer user intent, and performs actions based on the inferred user intent. For example, to act on an inferred user intent, the system can perform one or more of the following: identifying a task flow with steps and parameters designed to accomplish the inferred user intent, inputting specific requirements from the inferred user intent into the task flow; executing the task flow by invoking programs, methods, services, APIs, or the like; and generating output responses to the user in an audible (e.g., speech) and/or visual form.

Specifically, a digital assistant can be capable of accepting a user request at least partially in the form of a natural language command, request, statement, narrative, and/or inquiry. Typically, the user request can seek either an informational answer or performance of a task by the digital assistant. A satisfactory response to the user request can be a provision of the requested informational answer, a performance of the requested task, or a combination of the two. For example, a user can ask the digital assistant a question, such as “Where am I right now?” Based on the user's current location, the digital assistant can answer, “You are in Central Park near the west gate.” The user can also request the performance of a task, for example, “Please invite my friends to my girlfriend's birthday party next week.” In response, the digital assistant can acknowledge the request by saying “Yes, right away,” and then send a suitable calendar invite on behalf of the user to each of the user's friends listed in the user's electronic address book. During performance of a requested task, the digital assistant can sometimes interact with the user in a continuous dialogue involving multiple exchanges of information over an extended period of time. There are numerous other ways of interacting with a digital assistant to request information or performance of various tasks. In addition to providing verbal responses and taking programmed actions, the digital assistant can also provide responses in other visual or audio forms, e.g., as text, alerts, music, videos, animations, etc.

As shown in FIG. 1, in some examples, a digital assistant can be implemented according to a client-server model. The digital assistant can include a client-side portion 102 a, 102 b (hereafter “DA client 102”) executed on a user device 104 a, 104 b, and a server-side portion 106 (hereafter “DA server 106”) executed on a server system 108. The DA client 102 can communicate with the DA server 106 through one or more networks 110. The DA client 102 can provide client-side functionalities such as user-facing input and output processing and communication with the DA-server 106. The DA server 106 can provide server-side functionalities for any number of DA-clients 102 each residing on a respective user device 104.

In some examples, the DA server 106 can include a client-facing I/O interface 112, one or more processing modules 114, data and models 116, and an I/O interface to external services 118. The client-facing I/O interface can facilitate the client-facing input and output processing for the digital assistant server 106. The one or more processing modules 114 can utilize the data and models 116 to process speech input and determine the user's intent based on natural language input. Further, the one or more processing modules 114 perform task execution based on inferred user intent. In some examples, the DA-server 106 can communicate with external services 120 through the network(s) 110 for task completion or information acquisition. The I/O interface to external services 118 can facilitate such communications.

Examples of the user device 104 can include, but are not limited to, a handheld computer, a personal digital assistant (PDA), a tablet computer, a laptop computer, a desktop computer, a cellular telephone, a smart phone, an enhanced general packet radio service (EGPRS) mobile phone, a media player, a navigation device, a game console, a television, a television set-top box, a remote control, a wearable electronic device, or a combination of any two or more of these data processing devices or other data processing devices. More details on the user device 104 are provided in reference to an exemplary user device 104 shown in FIG. 2.

Examples of the communication network(s) 110 can include local area networks (LAN) and wide area networks (WAN), e.g., the Internet. The communication network(s) 110 can be implemented using any known network protocol, including various wired or wireless protocols, such as, for example, Ethernet, Universal Serial Bus (USB), FIREWIRE, Global System for Mobile Communications (GSM), Enhanced Data GSM Environment (EDGE), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, Wi-Fi, voice over Internet Protocol (VoIP), Wi-MAX, or any other suitable communication protocol.

The server system 108 can be implemented on one or more standalone data processing apparatus or a distributed network of computers. In some examples, the server system 108 can also employ various virtual devices and/or services of third-party service providers (e.g., third-party cloud service providers) to provide the underlying computing resources and/or infrastructure resources of the server system 108.

Although the digital assistant shown in FIG. 1 can include both a client-side portion (e.g., the DA-client 102) and a server-side portion (e.g., the DA-server 106), in some examples, the functions of a digital assistant can be implemented as a standalone application installed on a user device. In addition, the divisions of functionalities between the client and server portions of the digital assistant can vary in different implementations. For instance, in some examples, the DA client can be a thin-client that provides only user-facing input and output processing functions, and delegates all other functionalities of the digital assistant to a backend server.

2. User Device

FIG. 2 illustrates a block diagram of a user-device 104 in accordance with various examples. The user device 104 can include a memory interface 202, one or more processors 204, and a peripherals interface 206. The various components in the user device 104 can be coupled by one or more communication busses or signal lines. The user device 104 can include various sensors, subsystems, and peripheral devices that are coupled to the peripherals interface 206. The sensors, subsystems, and peripheral devices can gather information and/or facilitate various functionalities of the user device 104.

For example, a motion sensor 210, a light sensor 212, and a proximity sensor 214 can be coupled to the peripherals interface 206 to facilitate orientation, light, and proximity sensing functions. One or more other sensors 216, such as a positioning system (e.g., GPS receiver), a temperature sensor, a biometric sensor, a gyro, a compass, an accelerometer, and the like, can also be connected to the peripherals interface 206 to facilitate related functionalities.

In some examples, a camera subsystem 220 and an optical sensor 222 can be utilized to facilitate camera functions, such as taking photographs and recording video clips. Communication functions can be facilitated through one or more wired and/or wireless communication subsystems 224, which can include various communication ports, radio frequency receivers and transmitters, and/or optical (e.g., infrared) receivers and transmitters. An audio subsystem 226 can be coupled to speakers 228 and a microphone 230 to facilitate voice-enabled functions, such as voice recognition, voice replication, digital recording, and telephony functions. The microphone 230 can be configured to receive a speech input from the user.

In some examples, an I/O subsystem 240 can also be coupled to the peripherals interface 206. The I/O subsystem 240 can include a touch screen controller 242 and/or other input controller(s) 244. The touch-screen controller 242 can be coupled to a touch screen 246. The touch screen 246 and the touch screen controller 242 can, for example, detect contact and movement or break thereof using any of a plurality of touch sensitivity technologies, such as capacitive, resistive, infrared, surface acoustic wave technologies, proximity sensor arrays, and the like. The other input controller(s) 244 can be coupled to other input/control devices 248, such as one or more buttons, rocker switches, thumb-wheel, infrared port, USB port, and/or a pointer device such as a stylus.

In some examples, the memory interface 202 can be coupled to memory 250. The memory 250 can include any electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, a portable computer diskette (magnetic), a random access memory (RAM) (magnetic), a read-only memory (ROM) (magnetic), an erasable programmable read-only memory (EPROM) (magnetic), a portable optical disc such as CD, CD-R, CD-RW, DVD, DVD-R, or DVD-RW, or flash memory, such as compact flash cards, secured digital cards, USB memory devices, memory sticks, and the like. In some examples, a non-transitory computer-readable storage medium of the memory 250 can be used to store instructions (e.g., for performing the process 400, described below) for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In other examples, the instructions (e.g., for performing the process 400, described below) can be stored on a non-transitory computer-readable storage medium (not shown) of the server system 108, or can be divided between the non-transitory computer-readable storage medium of memory 250 and the non-transitory computer-readable storage medium of server system 110. In the context of this document, a “non-transitory computer readable storage medium” can be any medium that can contain or store the program for use by or in connection with the instruction execution system, apparatus, or device.

In some examples, the memory 250 can store an operating system 252, a communication module 254, a user interface module 256, a sensor processing module 258, a phone module 260, and applications 262. The operating system 252 can include instructions for handling basic system services and for performing hardware dependent tasks. The communication module 254 can facilitate communicating with one or more additional devices, one or more computers and/or one or more servers. The user interface module 256 can facilitate graphic user interface processing and output processing using other output channels (e.g., speakers). The sensor processing module 258 can facilitate sensor-related processing and functions. The phone module 260 can facilitate phone-related processes and functions. The application module 262 can facilitate various functionalities of user applications, such as electronic-messaging, web browsing, media processing, Navigation, imaging, and/or other processes and functions.

As described herein, the memory 250 can also store client-side digital assistant instructions (e.g., in a digital assistant client module 264) and various user data 266 (e.g., user-specific vocabulary data, preference data, and/or other data such as the user's electronic address book, to-do lists, shopping lists, user-specified name pronunciations, etc.) to provide the client-side functionalities of the digital assistant.

In various examples, the digital assistant client module 264 can be capable of accepting voice input (e.g., speech input), text input, touch input, and/or gestural input through various user interfaces (e.g., the I/O subsystem 244) of the user device 104. The digital assistant client module 264 can also be capable of providing output in audio (e.g., speech output), visual, and/or tactile forms. For example, output can be provided as voice, sound, alerts, text messages, menus, graphics, videos, animations, vibrations, and/or combinations of two or more of the above. During operation, the digital assistant client module 264 can communicate with the digital assistant server 106 using the communication subsystems 224.

In some examples, the digital assistant client module 264 can utilize the various sensors, subsystems, and peripheral devices to gather additional information from the surrounding environment of the user device 104 to establish a context associated with a user, the current user interaction, and/or the current user input. In some examples, the digital assistant client module 264 can provide the contextual information or a subset thereof with the user input to the digital assistant server to help infer the user's intent. In some examples, the digital assistant can also use the contextual information to determine how to prepare and deliver outputs to the user. Contextual information can be referred to as context data.

In some examples, the contextual information that accompanies the user input can include sensor information, e.g., lighting, ambient noise, ambient temperature, images or videos of the surrounding environment, etc. In some examples, the contextual information can also include the physical state of the device, e.g., device orientation, device location, device temperature, power level, speed, acceleration, motion patterns, cellular signals strength, etc. In some examples, information related to the software state of the digital assistant server 106, e.g., running processes, installed programs, past and present network activities, background services, error logs, resources usage, etc., and of the user device 104 can be provided to the digital assistant server as contextual information associated with a user input.

In some examples, the DA client module 264 can selectively provide information (e.g., user data 266) stored on the user device 104 in response to requests from the digital assistant server. In some examples, the digital assistant client module 264 can also elicit additional input from the user via a natural language dialogue or other user interfaces upon request by the digital assistant server 106. The digital assistant client module 264 can pass the additional input to the digital assistant server 106 to help the digital assistant server 106 in intent deduction and/or fulfillment of the user's intent expressed in the user request.

In various examples, the memory 250 can include additional instructions or fewer instructions. For example, the DA client module 264 can include any of the sub-modules of the digital assistant module 326 described below in FIG. 3A. Furthermore, various functions of the user device 104 can be implemented in hardware and/or in firmware, including in one or more signal processing and/or application specific integrated circuits.

3. Digital Assistant System

FIG. 3A illustrates a block diagram of an example digital assistant system 300 in accordance with various examples. In some examples, the digital assistant system 300 can be implemented on a standalone computer system. In some examples, the digital assistant system 300 can be distributed across multiple computers. In some examples, some of the modules and functions of the digital assistant can be divided into a server portion and a client portion, where the client portion resides on a user device (e.g., the user device 104) and communicates with the server portion (e.g., the server system 108) through one or more networks, e.g., as shown in FIG. 1. In some examples, the digital assistant system 300 can be an implementation of the server system 108 (and/or the digital assistant server 106) shown in FIG. 1. It should be noted that the digital assistant system 300 is only one example of a digital assistant system, and that the digital assistant system 300 can have more or fewer components than shown, may combine two or more components, or may have a different configuration or arrangement of the components. The various components shown in FIG. 3A can be implemented in hardware, software instructions for execution by one or more processors, firmware, including one or more signal processing and/or application specific integrated circuits, or a combination thereof.

The digital assistant system 300 can include memory 302, one or more processors 304, an input/output (I/O) interface 306, and a network communications interface 308. These components can communicate with one another over one or more communication buses or signal lines 310.

In some examples, the memory 302 can include a non-transitory computer readable medium, such as high-speed random access memory and/or a non-volatile computer-readable storage medium (e.g., one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state memory devices).

In some examples, the I/O interface 306 can couple input/output devices 316 of the digital assistant system 300, such as displays, keyboards, touch screens, and microphones, to the user interface module 322. The I/O interface 306, in conjunction with the user interface module 322, can receive user inputs (e.g., voice input, keyboard inputs, touch inputs, etc.) and processes them accordingly. In some examples, e.g., when the digital assistant is implemented on a standalone user device, the digital assistant system 300 can include any of the components and I/O and communication interfaces described with respect to the user device 104 in FIG. 2. In some examples, the digital assistant system 300 can represent the server portion of a digital assistant implementation, and can interact with the user through a client-side portion residing on a user device (e.g., the user device 104 shown in FIG. 2).

In some examples, the network communications interface 308 can include wired communication port(s) 312 and/or wireless transmission and reception circuitry 314. The wired communication port(s) can receive and send communication signals via one or more wired interfaces, e.g., Ethernet, Universal Serial Bus (USB), FIREWIRE, etc. The wireless circuitry 314 can receive and send RF signals and/or optical signals from/to communications networks and other communications devices. The wireless communications can use any of a plurality of communications standards, protocols, and technologies, such as GSM, EDGE, CDMA, TDMA, Bluetooth, Wi-Fi, VoIP, Wi-MAX, or any other suitable communication protocol. The network communications interface 308 can enable communication between the digital assistant system 300 with networks, such as the Internet, an intranet, and/or a wireless network, such as a cellular telephone network, a wireless local area network (LAN), and/or a metropolitan area network (MAN), and other devices.

In some examples, memory 302, or the computer readable storage media of memory 302, can store programs, modules, instructions, and data structures including all or a subset of: an operating system 318, a communications module 320, a user interface module 322, one or more applications 324, and a digital assistant module 326. In particular, memory 302, or the computer readable storage media of memory 302, can store instructions for performing the process 400, described below. The one or more processors 304 can execute these programs, modules, and instructions, and reads/writes from/to the data structures.

The operating system 318 (e.g., Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, or an embedded operating system such as VxWorks) can include various software components and/or drivers for controlling and managing general system tasks (e.g., memory management, storage device control, power management, etc.) and facilitates communications between various hardware, firmware, and software components.

The communications module 320 can facilitate communications between the digital assistant system 300 with other devices over the network communications interface 308. For example, the communications module 320 can communicate with the communication module 254 of the device 104 shown in FIG. 2. The communications module 320 can also include various components for handling data received by the wireless circuitry 314 and/or wired communications port 312.

The user interface module 322 can receive commands and/or inputs from a user via the I/O interface 306 (e.g., from a keyboard, touch screen, pointing device, controller, and/or microphone), and generate user interface objects on a display. The user interface module 322 can also prepare and deliver outputs (e.g., speech, sound, animation, text, icons, vibrations, haptic feedback, light, etc.) to the user via the I/O interface 306 (e.g., through displays, audio channels, speakers, touch-pads, etc.).

The applications 324 can include programs and/or modules that are configured to be executed by the one or more processors 304. For example, if the digital assistant system is implemented on a standalone user device, the applications 324 can include user applications, such as games, a calendar application, a navigation application, or an email application. If the digital assistant system 300 is implemented on a server farm, the applications 324 can include resource management applications, diagnostic applications, or scheduling applications, for example.

The memory 302 can also store the digital assistant module (or the server portion of a digital assistant) 326. In some examples, the digital assistant module 326 can include the following sub-modules, or a subset or superset thereof: an input/output processing module 328, a speech-to-text (STT) processing module 330, a natural language processing module 332, a dialogue flow processing module 334, a task flow processing module 336, a service processing module 338, and a speech synthesis module 340. Each of these modules can have access to one or more of the following systems or data and models of the digital assistant 326, or a subset or superset thereof: ontology 360, vocabulary index 344, user data 348, task flow models 354, service models 356, ASR systems, and pronunciation system 342.

In some examples, using the processing modules, data, and models implemented in the digital assistant module 326, the digital assistant can perform at least some of the following: converting speech input into text; identifying a user's intent expressed in a natural language input received from the user; actively eliciting and obtaining information needed to fully infer the user's intent (e.g., by disambiguating words, games, intentions, etc.); determining the task flow for fulfilling the inferred intent; and executing the task flow to fulfill the inferred intent.

In some examples, as shown in FIG. 3B, the I/O processing module 328 can interact with the user through the I/O devices 316 in FIG. 3A or with a user device (e.g., a user device 104 in FIG. 1) through the network communications interface 308 in FIG. 3A to obtain user input (e.g., a speech input) and to provide responses (e.g., as speech outputs) to the user input. The I/O processing module 328 can optionally obtain contextual information associated with the user input from the user device, along with or shortly after the receipt of the user input. The contextual information can include user-specific data, vocabulary, and/or preferences relevant to the user input. In some examples, the contextual information also includes software and hardware states of the device (e.g., the user device 104 in FIG. 1) at the time the user request is received, and/or information related to the surrounding environment of the user at the time that the user request was received. In some examples, the I/O processing module 328 can also send follow-up questions to, and receive answers from, the user regarding the user request. When a user request is received by the I/O processing module 328 and the user request can include speech input, the I/O processing module 328 can forward the speech input to the STT processing module 330 (or speech recognizer) for speech-to-text conversions.

The STT processing module 330 can include one or more ASR systems. The one or more ASR systems can process the speech input that is received through the I/O processing module 328 to produce a recognition result. Each ASR system can include a front-end speech pre-processor. The front-end speech pre-processor can extract representative features from the speech input. For example, the front-end speech pre-processor can perform a Fourier transform on the speech input to extract spectral features that characterize the speech input as a sequence of representative multi-dimensional vectors. Further, each ASR system can include one or more speech recognition models (e.g., acoustic models and/or language models) and can implement one or more speech recognition engines. Examples of speech recognition models can include Hidden Markov Models, Gaussian-Mixture Models, Deep Neural Network Models, n-gram language models, and other statistical models. Examples of speech recognition engines can include the dynamic time warping based engines and weighted finite-state transducers (WFST) based engines. The one or more speech recognition models and the one or more speech recognition engines can be used to process the extracted representative features of the front-end speech pre-processor to produce intermediate recognitions results (e.g., phonemes, phonemic strings, and sub-words), and ultimately, text recognition results (e.g., words, word strings, or sequence of tokens). In some examples, the speech input can be processed at least partially by a third-party service or on the user's device (e.g., user device 104) to produce the recognition result. Once the STT processing module 330 produces recognition results containing a text string (e.g., words, or sequence of words, or sequence of tokens), the recognition result can be passed to the natural language processing module 332 for intent deduction.

In some examples, the STT processing module 330 can include and/or access a vocabulary of recognizable words via a phonetic alphabet conversion module 331. Each vocabulary word can be associated with one or more candidate pronunciations of the word represented in a speech recognition phonetic alphabet. In particular, the vocabulary of recognizable words can include a word that is associated with a plurality of candidate pronunciations. For example, the vocabulary may include the word “tomato” that is associated with the candidate pronunciations of /

/ and /

/. Further, vocabulary words can be associated with custom candidate pronunciations that are based on previous speech inputs from the user. Such custom candidate pronunciations can be stored in the STT processing module 330 and can be associated with a particular user via the user's profile on the device. In some examples, the candidate pronunciations for words can be determined based on the spelling of the word and one or more linguistic and/or phonetic rules. In some examples, the candidate pronunciations can be manually generated, e.g., based on known canonical pronunciations.

In some examples, the candidate pronunciations can be ranked based on the commonness of the candidate pronunciation. For example, the candidate pronunciation /

/ can be ranked higher than /

/, because the former is a more commonly used pronunciation (e.g., among all users, for users in a particular geographical region, or for any other appropriate subset of users). In some examples, candidate pronunciations can be ranked based on whether the candidate pronunciation is a custom candidate pronunciation associated with the user. For example, custom candidate pronunciations can be ranked higher than canonical candidate pronunciations. This can be useful for recognizing proper nouns having a unique pronunciation that deviates from canonical pronunciation. In some examples, candidate pronunciations can be associated with one or more speech characteristics such as geographic origin, nationality, or ethnicity. For example, the candidate pronunciation /

/ can be associated with the United States while the candidate pronunciation /

/ can be associated with Great Britain. Further, the rank of the candidate pronunciation can be based on one or more characteristics (e.g., geographic origin, nationality, ethnicity, etc.) of the user stored in the user's profile on the device. For example, it can be determined from the user's profile that the user is associated with the United States. Based the user being associated with the United States, the candidate pronunciation /

/ (associated with the United States) can be ranked higher than the candidate pronunciation /

/(associated with Great Britain). In some examples, one of the ranked candidate pronunciations can be selected as a predicted pronunciation (e.g., the most likely pronunciation).

When a speech input is received, the STT processing module 330 can be used to determine the phonemes corresponding to the speech input (e.g., using an acoustic model), and then attempt to determine words that match the phonemes (e.g., using a language model). For example, if the STT processing module 330 can first identify the sequence of phonemes /

/ corresponding to a portion of the speech input, it can then determine, based on the vocabulary index 344, that this sequence corresponds to the word “tomato.”

In some examples, the STT processing module 330 can use approximate matching techniques to determine words in an utterance. Thus, for example, the STT processing module 330 can determine that the sequence of phonemes /

/ corresponds to the word “tomato,” even if that particular sequence of phonemes is not one of the candidate sequence of phonemes for that word.

The natural language processing module 332 (“natural language processor”) of the digital assistant can take the sequence of words or tokens (“token sequence”) generated by the STT processing module 330, and attempt to associate the token sequence with one or more “actionable intents” recognized by the digital assistant. An “actionable intent” can represent a task that can be performed by the digital assistant, and can have an associated task flow implemented in the task flow models 354. The associated task flow can be a series of programmed actions and steps that the digital assistant takes in order to perform the task. The scope of a digital assistant's capabilities can be dependent on the number and variety of task flows that have been implemented and stored in the task flow models 354, or in other words, on the number and variety of “actionable intents” that the digital assistant recognizes. The effectiveness of the digital assistant, however, can also be dependent on the assistant's ability to infer the correct “actionable intent(s)” from the user request expressed in natural language.

In some examples, in addition to the sequence of words or tokens obtained from the STT processing module 330, the natural language processing module 332 can also receive contextual information associated with the user request, e.g., from the I/O processing module 328. The natural language processing module 332 can optionally use the contextual information to clarify, supplement, and/or further define the information contained in the token sequence received from the STT processing module 330. The contextual information can include, for example, user preferences, hardware, and/or software states of the user device, sensor information collected before, during, or shortly after the user request, prior interactions (e.g., dialogue) between the digital assistant and the user, and the like. As described herein, contextual information can be dynamic, and can change with time, location, content of the dialogue, and other factors.

In some examples, the natural language processing can be based on, e.g., ontology 360. The ontology 360 can be a hierarchical structure containing many nodes, each node representing either an “actionable intent” or a “property” relevant to one or more of the “actionable intents” or other “properties.” As noted above, an “actionable intent” can represent a task that the digital assistant is capable of performing, i.e., it is “actionable” or can be acted on. A “property” can represent a parameter associated with an actionable intent or a sub-aspect of another property. A linkage between an actionable intent node and a property node in the ontology 360 can define how a parameter represented by the property node pertains to the task represented by the actionable intent node.

In some examples, the ontology 360 can be made up of actionable intent nodes and property nodes. Within the ontology 360, each actionable intent node can be linked to one or more property nodes either directly or through one or more intermediate property nodes. Similarly, each property node can be linked to one or more actionable intent nodes either directly or through one or more intermediate property nodes. For example, as shown in FIG. 3C, the ontology 360 can include a “restaurant reservation” node (i.e., an actionable intent node). Property nodes “restaurant,” “date/time” (for the reservation), and “party size” can each be directly linked to the actionable intent node (i.e., the “restaurant reservation” node).

In addition, property nodes “cuisine,” “price range,” “phone number,” and “location” can be sub-nodes of the property node “restaurant,” and can each be linked to the “restaurant reservation” node (i.e., the actionable intent node) through the intermediate property node “restaurant.” For another example, as shown in FIG. 3C, the ontology 360 can also include a “set reminder” node (i.e., another actionable intent node). Property nodes “date/time” (for setting the reminder) and “subject” (for the reminder) can each be linked to the “set reminder” node. Since the property “date/time” can be relevant to both the task of making a restaurant reservation and the task of setting a reminder, the property node “date/time” can be linked to both the “restaurant reservation” node and the “set reminder” node in the ontology 360.

An actionable intent node, along with its linked concept nodes, can be described as a “domain.” In the present discussion, each domain can be associated with a respective actionable intent, and refers to the group of nodes (and the relationships there between) associated with the particular actionable intent. For example, the ontology 360 shown in FIG. 3C can include an example of a restaurant reservation domain 362 and an example of a reminder domain 364 within the ontology 360. The restaurant reservation domain includes the actionable intent node “restaurant reservation,” property nodes “restaurant,” “date/time,” and “party size,” and sub-property nodes “cuisine,” “price range,” “phone number,” and “location.” The reminder domain 364 can include the actionable intent node “set reminder,” and property nodes “subject” and “date/time.” In some examples, the ontology 360 can be made up of many domains. Each domain can share one or more property nodes with one or more other domains. For example, the “date/time” property node can be associated with many different domains (e.g., a scheduling domain, a travel reservation domain, a movie ticket domain, etc.), in addition to the restaurant reservation domain 362 and the reminder domain 364.

While FIG. 3C illustrates two example domains within the ontology 360, other domains can include, for example, “initiate a phone call,” “find directions,” “schedule a meeting,” “send a message,” and “provide an answer to a question,” “read a list,” “providing navigation instructions,” “provide instructions for a task” and so on. A “send a message” domain can be associated with a “send a message” actionable intent node, and may further include property nodes such as “recipient(s),” “message type,” and “message body.” The property node “recipient” can be further defined, for example, by the sub-property nodes such as “recipient name” and “message address.”

In some examples, the ontology 360 can include all the domains (and hence actionable intents) that the digital assistant is capable of understanding and acting upon. In some examples, the ontology 360 can be modified, such as by adding or removing entire domains or nodes, or by modifying relationships between the nodes within the ontology 360.

In some examples, nodes associated with multiple related actionable intents can be clustered under a “super domain” in the ontology 360. For example, a “travel” super-domain can include a cluster of property nodes and actionable intent nodes related to travel. The actionable intent nodes related to travel can include “airline reservation,” “hotel reservation,” “car rental,” “get directions,” “find points of interest,” and so on. The actionable intent nodes under the same super domain (e.g., the “travel” super domain) can have many property nodes in common. For example, the actionable intent nodes for “airline reservation,” “hotel reservation,” “car rental,” “get directions,” and “find points of interest” can share one or more of the property nodes “start location,” “destination,” “departure date/time,” “arrival date/time,” and “party size.”

In some examples, each node in the ontology 360 can be associated with a set of words and/or phrases that are relevant to the property or actionable intent represented by the node. The respective set of words and/or phrases associated with each node can be the so-called “vocabulary” associated with the node. The respective set of words and/or phrases associated with each node can be stored in the vocabulary index 344 in association with the property or actionable intent represented by the node. For example, returning to FIG. 3B, the vocabulary associated with the node for the property of “restaurant” can include words such as “food,” “drinks,” “cuisine,” “hungry,” “eat,” “pizza,” “fast food,” “meal,” and so on. For another example, the vocabulary associated with the node for the actionable intent of “initiate a phone call” can include words and phrases such as “call,” “phone,” “dial,” “ring,” “call this number,” “make a call to,” and so on. The vocabulary index 344 can optionally include words and phrases in different languages. In some examples, the vocabulary associated with the node (e.g., actionable intent, parameter/property) can include a heteronym and the heteronym in the vocabulary can be associated with a particular meaning and pronunciation. For example, the heteronym in the vocabulary can be uniquely identified (e.g., by means of a tag, label, token, metadata, and the like) as being associated with a particular meaning and pronunciation.

The natural language processing module 332 can receive the token sequence (e.g., a text string) from the STT processing module 330, and determine what nodes are implicated by the words in the token sequence. In some examples, if a word or phrase in the token sequence is found to be associated with one or more nodes in the ontology 360 (via the vocabulary index 344), the word or phrase can “trigger” or “activate” those nodes. Based on the quantity and/or relative importance of the activated nodes, the natural language processing module 332 can select one of the actionable intents as the task that the user intended the digital assistant to perform. In some examples, the domain that has the most “triggered” nodes can be selected. In some examples, the domain having the highest confidence value (e.g., based on the relative importance of its various triggered nodes) can be selected. In some examples, the domain can be selected based on a combination of the number and the importance of the triggered nodes. In some examples, additional factors are considered in selecting the node as well, such as whether the digital assistant has previously correctly interpreted a similar request from a user.

User data 348 can include user-specific information, such as user-specific vocabulary, user preferences, user address, user's default and secondary languages, user's contact list, and other short-term or long-term information for each user. In some examples, the natural language processing module 332 can use the user-specific information to supplement the information contained in the user input to further define the user intent. For example, for a user request “invite my friends to my birthday party,” the natural language processing module 332 can be able to access user data 348 to determine who the “friends” are and when and where the “birthday party” would be held, rather than requiring the user to provide such information explicitly in his/her request.

In some examples, once the natural language processing module 332 identifies an actionable intent (or domain) based on the user request, the natural language processing module 332 can generate a structured query to represent the identified actionable intent. In some examples, the structured query can include parameters for one or more nodes within the domain for the actionable intent, and at least some of the parameters are populated with the specific information and requirements specified in the user request. For example, the user may say “Make me a dinner reservation at a sushi place at 7.” In this case, the natural language processing module 332 can be able to correctly identify the actionable intent to be “restaurant reservation” based on the user input. According to the ontology, a structured query for a “restaurant reservation” domain may include parameters such as {Cuisine}, {Time}, {Date}, {Party Size}, and the like. In some examples, based on the speech input and the text derived from the speech input using the STT processing module 330, the natural language processing module 332 can generate a partial structured query for the restaurant reservation domain, where the partial structured query includes the parameters {Cuisine=“Sushi”} and {Time=“7 pm”}. However, in this example, the user's utterance contains insufficient information to complete the structured query associated with the domain. Therefore, other necessary parameters such as {Party Size} and {Date} may not be specified in the structured query based on the information currently available. In some examples, the natural language processing module 332 can populate some parameters of the structured query with received contextual information. For example, in some examples, if the user requested a sushi restaurant “near me,” the natural language processing module 332 can populate a {location} parameter in the structured query with GPS coordinates from the user device 104.

In some examples, the natural language processing module 332 can pass the structured query (including any completed parameters) to the task flow processing module 336 (“task flow processor”). The task flow processing module 336 can be configured to receive the structured query from the natural language processing module 332, complete the structured query, if necessary, and perform the actions required to “complete” the user's ultimate request. In some examples, the various procedures necessary to complete these tasks can be provided in task flow models 354. In some examples, the task flow models can include procedures for obtaining additional information from the user and task flows for performing actions associated with the actionable intent.

As described above, in order to complete a structured query, the task flow processing module 336 may need to initiate additional dialogue with the user in order to obtain additional information, and/or disambiguate potentially ambiguous utterances. When such interactions are necessary, the task flow processing module 336 can invoke the dialogue flow processing module 334 to engage in a dialogue with the user. In some examples, the dialogue flow processing module 334 can determine how (and/or when) to ask the user for the additional information and receives and processes the user responses. The questions can be provided to and answers can be received from the users through the I/O processing module 328. In some examples, the dialogue flow processing module 334 can present dialogue output to the user via audio and/or visual output, and receives input from the user via spoken or physical (e.g., clicking) responses. Continuing with the example above, when the task flow processing module 336 invokes the dialogue flow processing module 334 to determine the “party size” and “date” information for the structured query associated with the domain “restaurant reservation,” the dialogue flow processing module 334 can generate questions such as “For how many people?” and “On which day?” to pass to the user. Once answers are received from the user, the dialogue flow processing module 334 can then populate the structured query with the missing information, or pass the information to the task flow processing module 336 to complete the missing information from the structured query.

Once the task flow processing module 336 has completed the structured query for an actionable intent, the task flow processing module 336 can proceed to perform the ultimate task associated with the actionable intent. Accordingly, the task flow processing module 336 can execute the steps and instructions in the task flow model according to the specific parameters contained in the structured query. For example, the task flow model for the actionable intent of “restaurant reservation” can include steps and instructions for contacting a restaurant and actually requesting a reservation for a particular party size at a particular time. For example, using a structured query such as: {restaurant reservation, restaurant=ABC Café, date=3/12/2012, time=7 pm, party size=5}, the task flow processing module 336 can perform the steps of: (1) logging onto a server of the ABC Café or a restaurant reservation system such as OPENTABLE®, (2) entering the date, time, and party size information in a form on the website, (3) submitting the form, and (4) making a calendar entry for the reservation in the user's calendar.

In some examples, the task flow processing module 336 can employ the assistance of a service processing module 338 (“service processing module”) to complete a task requested in the user input or to provide an informational answer requested in the user input. For example, the service processing module 338 can act on behalf of the task flow processing module 336 to make a phone call, set a calendar entry, invoke a map search, invoke or interact with other user applications installed on the user device, and invoke or interact with third-party services (e.g., a restaurant reservation portal, a social networking website, a banking portal, etc.). In some examples, the protocols and application programming interfaces (API) required by each service can be specified by a respective service model among the service models 356. The service processing module 338 can access the appropriate service model for a service and generate requests for the service in accordance with the protocols and APIs required by the service according to the service model.

For example, if a restaurant has enabled an online reservation service, the restaurant can submit a service model specifying the necessary parameters for making a reservation and the APIs for communicating the values of the necessary parameter to the online reservation service. When requested by the task flow processing module 336, the service processing module 338 can establish a network connection with the online reservation service using the web address stored in the service model, and send the necessary parameters of the reservation (e.g., time, date, party size) to the online reservation interface in a format according to the API of the online reservation service.

In some examples, the natural language processing module 332, dialogue flow processing module 334, and task flow processing module 336 can be used collectively and iteratively to infer and define the user's intent, obtain information to further clarify and refine the user intent, and finally generate a response (i.e., an output to the user, or the completion of a task) to fulfill the user's intent. The generated response can be a dialogue response to the speech input that at least partially fulfills the user's intent. Further, in some examples, the generated response can be output as a speech output. In these examples, the generated response can be sent to the speech synthesis module 340 (e.g., speech synthesizer) where it can be processed to synthesize the dialogue response in speech form.

The speech synthesis module 340 can be configured to synthesize speech outputs for presentation to the user. The speech synthesis module 340 synthesizes speech outputs based on text provided by the digital assistant. For example, the generated dialogue response can be in the form of a text string. The speech synthesis module 340 can convert the text string to an audible speech output. The speech synthesis module 340 can use any appropriate speech synthesis technique in order to generate speech outputs from text, including, but not limited, to concatenative synthesis, unit selection synthesis, diphone synthesis, domain-specific synthesis, formant synthesis, articulatory synthesis, hidden Markov model (HMM) based synthesis, and sinewave synthesis. In some examples, the speech synthesis module 340 can be configured to synthesize individual words based on phonemic strings corresponding to the words. For example, a phonemic string can be associated with a word in the generated dialogue response. The phonemic string can be stored in metadata associated with the word. The speech synthesis model 340 can be configured to directly process the phonemic string in the metadata to synthesize the word in speech form.

Further, speech synthesis module 340 can include a pronunciation system 342 for disambiguating heteronyms. Pronunciation system 342 can thus be configured to determine the correct pronunciation of a heteronym in the speech input or the generated dialogue response. In some examples, pronunciation system 342 can utilize at least one of the speech input, the n-gram language model of the ASR system 331, the natural language processing module 332, and received context (e.g., contextual information) to determine the correct pronunciation of the heteronym. In determining the correct pronunciation of the heteronym, the pronunciation system 342 can obtain a phonemic string corresponding to the correct pronunciation of the heteronym from one or more acoustic models or language models of the ASR system 331. Further, in some examples, the pronunciation system 342 can annotate (e.g., by means of a tag, label, token, or metadata) the heteronym in the generated dialogue response to identify the correct pronunciation associated with the heteronym. In cases where there is conflicting information between the speech input, the ASR system, the natural language processing module 332, and contextual information regarding the correct pronunciation of the heteronym, the pronunciation system 342 can be configured to apply predetermined logic or rules (e.g., voting schemes, combination schemes, weighting schemes, and the like) to determine the correct pronunciation of the heteronym. As described in greater detail below, the pronunciation system 342 can be configured to perform block 418 of process 400.

In some examples, instead of (or in addition to) using the local speech synthesis module 340, speech synthesis is performed on a remote device (e.g., the server system 108), and the synthesized speech is sent to the user device 104 for output to the user. For example, this occurs in some implementations where outputs for a digital assistant are generated at a server system. And because server systems generally have more processing power or resources than a user device, it may be possible to obtain higher quality speech outputs than would be practical with client-side synthesis.

Additional details on digital assistants can be found in the U.S. Utility application Ser. No. 12/987,982, entitled “Intelligent Automated Assistant,” filed Jan. 10, 2011, and U.S. Utility application Ser. No. 13/251,088, entitled “Generating and Processing Task Items That Represent Tasks to Perform,” filed Sep. 30, 2011, the entire disclosures of which are incorporated herein by reference.

4. Process for Operating a Digital Assistant

FIG. 4 illustrates a process 400 for operating a digital assistant according to various examples. Process 400 can be performed at an electronic device with one or more processors and memory storing one or more programs for execution by the one or more processors. In some examples, the process 400 can be performed at the user device 104 or the server system 108. In some examples, the process 400 can be performed by the digital assistant system 300 (FIG. 3A), which, as noted above, may be implemented on a standalone computer system (e.g., either the user device 104 or the server system 108) or distributed across multiple computers (e.g., the user device 104, the server system 108, and/or additional or alternative devices or systems). While the following discussion describes the process 400 as being performed by a digital assistant (e.g., the digital assistant system 300), the process is not limited to performance by any particular device, combination of devices, or implementation. Moreover, the individual blocks of the processes may be distributed among the one or more computers, systems, or devices in any appropriate manner.

At block 402 of process 400, a speech input can be received from a user. In some examples, the speech input can be received in the course of, or as part of, an interaction with the digital assistant. The speech input can be received in the form of sound waves, an audio file, or a representative audio signal (analog or digital). In some examples, the speech input can be sound waves that are received by the microphone (e.g., microphone 230) of the electronic device (e.g., user device 104). In other examples, the speech input can be a representative audio signal or a recorded audio file that is received by the audio subsystem (e.g., audio subsystem 226), the peripheral interface (e.g., peripheral interface 206), or the processor (e.g., processor 204) of the electronic device. In yet other examples, the speech input can be a representative audio signal or a recorded audio file that is received by the I/O interface (e.g., I/O interface 306) or the processor (e.g., processor 304) of the digital assistant system.

In some examples, the speech input can include a user request. The user request can be any request, including a request that indicates a task that the digital assistant can perform (e.g., making and/or facilitating restaurant reservations, initiating telephone calls or text messages, etc.), a request for a response (e.g., an answer to a question, such as “How far is Earth from the sun?”), and the like.

In some examples, the speech input can contain a heteronym and one or more additional words. One example of a speech input containing a heteronym and one or more additional words can include, “How's the weather in Nice?” where “Nice” is the heteronym. As previously described, the heteronym “Nice” can be a proper noun having the pronunciation of /nis/ (indicated using the International Phonetic Alphabet) or an adjective having the pronunciation of /naIs/. It should be recognized that in examples where the speech input is not used to determine the correct pronunciation of the heteronym (e.g., at block 418), the speech input need not include a heteronym.

At block 404 of process 400, contextual information associated with the speech input can be received. The contextual information received at block 404 can be similar or identical to the contextual information described above for inferring the user's intent or determining how to prepare and deliver outputs. In some examples, the contextual information can accompany the speech input. In some examples, the contextual information can include sensor information received from a sensor of the electronic device (e.g., a motion sensor 210, a light sensor 212, a proximity sensor 214, a positioning system, a temperature sensor, a biometric sensor, a gyro, a compass of the user device 104). In particular, the contextual information can include the location of the user at the time the speech input of block 402 is received. In some examples, the contextual information can include information received from an application of the user device (e.g., contacts, calendar, clock, web browser, messages, maps application, weather application, and the like). In some examples, the contextual information can include information associated with the user, such as the user's identity, geographical origin, nationality, or ethnicity. Such user information can be received from the user's profile stored on the device. The received contextual information can be used at block 414 to determine an actionable intent or at block 418 to determine the correct pronunciation of the heteronym, as describe below.

At block 406 of process 400, the speech input can be processed using an ASR system. For example, the speech input can be processed using an ASR system of the STT processing module 330, as described above. Block 406 can include one or more of blocks 408 through 412, as described below. Accordingly, the speech input can be processed using the ASR system to determine at least one of a phonemic string corresponding to the heteronym as pronounced in the speech input, a frequency of occurrence of an n-gram with respect to a corpus, and a text string corresponding to the speech input.

At block 408 of process 400, a phonemic string corresponding to the heteronym as pronounced by the user in the speech input can be determined. As described above, in some examples, the front-end speech pre-processor of the ASR system can extract representative features from the speech input. The representative features can be processed using an acoustic model of the ASR system to produce, for example, a sequence of phonemes corresponding to the speech input as pronounced by the user. The sequence of phonemes can be further processed using a language model of the ASR system to map phonemic strings within the sequence of phonemes to corresponding words. In particular, a phonemic string within the sequence of phonemes can be mapped to the heteronym in the speech input. This phonemic string can correspond to the heteronym as pronounced by the user in the speech input.

At block 410 of process 400, a frequency of occurrence of an n-gram with respect to a corpus can be determined. The n-gram can include the heteronym and the one or more additional words. For example, in the speech input, “How's the weather in Nice?” the n-gram can be the word trigram “weather in Nice” where the heteronym is “Nice” (the proper noun associated with the pronunciation /nis/) and the one or more additional words is “weather in.” The frequency of occurrence of the n-gram with respect to a corpus can be determined using an n-gram language model of the ASR system that is trained using the corpus. In some examples, the frequency of occurrence of the n-gram can be in the form of raw counts. For example, a particular trigram can occur 25 times within the corpus. Accordingly, the frequency of occurrence of that particular trigram within the corpus can be 25 counts. In other cases, the frequency of occurrence can be a normalized value. For example, the frequency of occurrence can be in the form of a likelihood or probability (e.g., probability distribution). In one such example, the corpus of natural language text can include 25 counts of a particular trigram and 1000 counts of all trigrams. Accordingly, the frequency of occurrence of that trigram within the corpus can be equal to 25/1000.

The n-gram language model can be configured to distinguish the meaning or pronunciation associated with a heteronym. For example, the n-gram language model can have separate entries to distinguish between the proper noun “Nice” associated with the pronunciation /nis/ and the adjective “nice” associated with the pronunciation /naIs/. In particular, the trigram “weather in Nice” (proper noun “Nice”) in the trigram language model can be distinct from the trigram “weather in nice” (adjective “nice”) in the n-gram language model. In some examples, the n-gram language model can distinguish between heteronyms using metadata (e.g., tagging, tokenization, and the like).

Further, in some examples, block 410 can include determining a frequency of occurrence of a second n-gram with respect to the corpus. The second n-gram can include the heteronym and the one or more additional words. Although the n-gram and the second n-gram can include the same sequence of words, the heteronym in the second n-gram can be associated with a different meaning and pronunciation than the n-gram. Returning to the example speech input, “How's the weather in Nice?” the second n-gram can be the word trigram “weather in nice” where the heteronym “nice” is associated with the adjective and with the pronunciation /naIs/. In this example, the frequency of occurrence of the trigram “weather in Nice” (/nis/) is likely greater than the frequency of occurrence of the second trigram “weather in nice” /naIs/). Thus, it can be determined that the heteronym “Nice” in the speech input is more likely to be associated with the pronunciation /nis/ rather than /naIs/. Accordingly, by comparing the frequency of occurrence of the n-gram and the frequency of occurrence of the second n-gram, the heteronym in the speech input can be disambiguated.

Although in the above example, the one or more additional words can precede the heteronym in the speech input, it should be recognized that in other examples, the one or more additional words can succeed the heteronym or the heteronym can be positioned between the one or more additional words.

At block 412 of process 400, a text string corresponding to the speech input can be determined. In particular, one or more language models of the ASR system can be used to determine the text string. In some examples, the n-gram language model used to determine frequency of occurrence of the n-gram at block 410 can be used to determine the text string. In some examples, as described above with reference to block 408, the sequence of phonemes determined using an acoustic model can be processed using the one or more language models of the ASR system to map phonemic strings within the sequence of phonemes to corresponding words. In this way, the text string corresponding to the speech input can be determined. Accordingly, the text string can be a transcription of the speech input and can include the heteronym in the speech input. In some examples, the text string can be in the form of a token sequence.

At block 414 of process 400, an actionable intent based on the text string can be determined. As described above, in some examples, an actionable intent can represent a task that can be performed by the digital assistant. The actionable intent can be determined by means of natural language processing. For example, the natural language processing module 332, described above, can process the text string of block 412 to determine the actionable intent that is consistent with the text string. In a specific example, the text string can be “How's the weather in Nice?” and the determined actionable intent can be “report weather,” which can represent the task of retrieving the current and/or forecasted weather for the location of <Nice, France> and outputting the retrieved weather on the electronic device to the user.

As described above, an actionable intent can be associated with one or more parameters. For example, the actionable intent of “report weather” can be associated with the parameters of {location} and {date/time} (e.g., current date/time). In some examples, block 414 can include assigning the heteronym to a parameter of the actionable intent. In an example where the text string is “How's the weather in Nice?” the heteronym “Nice” can be assigned to the parameter of {location} such that {location=“Nice, France”}. In some examples, as described in greater detail at block 418, the heteronym can be disambiguated based on the parameter to which it is assigned.

Further, as described above, an actionable intent, including a parameter of an actionable intent, can be associated with a set of words and/or phrases. The set of words and/or phrases can be a vocabulary list associated with the actionable intent or a parameter of the actionable intent. The text string can be mapped to a particular actionable intent based on the text string and the vocabulary list having one or more common words. For example, a vocabulary list associated with the actionable intent of “report weather” can include the words “weather” and “Nice.” If the text string is “How's the weather in Nice?” the actionable intent can be determined to be “report weather” based on the common words “weather” and “Nice” in the text string and the vocabulary list associated with the actionable intent of “report weather.”

In some examples, a vocabulary list associated with an actionable intent can include one or more heteronyms and the one or more heteronyms can each be uniquely identified (e.g., by means of tagging, tokenizing, and the like) as being associated with a particular meaning and/or a particular pronunciation. For example, the vocabulary list associated with the parameter {location} of the actionable intent “report weather” can include the heteronym “Nice” (proper noun). In this example, “Nice” in the vocabulary list can be uniquely identified as being associated with the proper noun and the pronunciation /nis/ rather than the adjective and the pronunciation/naIs/. This can be desirable in enabling the use of the vocabulary list as a knowledge base for disambiguating heteronyms.

Further, as described above, the contextual information received at block 404 can be used to determine the actionable intent. For example, information from the sensors and applications of the electronic device can be used to infer missing information in the text string and thus disambiguate the user's intent associated with the speech input. Further, in some examples, the contextual information can be associated with the parameters of a particular actionable intent and thus the actionable intent can be determined based on these associations.

At block 416 of process 400, a dialogue response to the speech input can be generated. In some examples, the dialogue response can include the heteronym in the speech input. Referring back to the example speech input, “How's the weather in Nice?” the generated dialogue response can include, “Here's the weather in Nice, France between today and Saturday.” In some examples, the dialogue response can be generated using the dialogue flow processing module 334. As described above, the dialogue flow processing module 334 can cooperate with the natural language processing module 332 and task flow processing module 336 to generate the dialogue response.

The dialogue response can be any appropriate response in natural language form that at least partially addresses the speech input. In examples where the speech input contains a user request, the generated dialogue response can be one that at least partially fulfills the user's request. In some examples, the generated dialogue response can be a confirmatory response or a request for further information needed to fulfill the user's request. In some examples, the dialogue response can be generated based on the actionable intent determined at block 414. In a specific example, the actionable intent can be determined to be “report weather” and the generated dialogue response can be directed to reporting the weather to the user.

At block 418 of process 400, a correct pronunciation of the heteronym can be determined. In some examples, block 416 can be performed using the speech synthesis module (e.g., the speech synthesis module 340) of the digital assistant. In particular, a pronunciation system (e.g., the pronunciation system 342) of the speech synthesis module can be used to perform block 418.

In some examples, the correct pronunciation of the heteronym can be determined based on the speech input. In particular, the correct pronunciation of the heteronym can be based on the phonemic string determined at block 408. For example, the correct pronunciation of the heteronym can be determined to be consistent with the phonemic string determined at block 408 where the correct pronunciation of the heteronym is similar or identical to the pronunciation of the heteronym by the user in the speech input. In these examples, speech synthesis of the heteronym can be performed using the phonemic string, as described in greater detail at block 420.

In some examples, the correct pronunciation of the heteronym can be determined using the n-gram language model of the ASR system. In some examples, the context in the speech input can be utilized to disambiguate the heteronym. For example, the correct pronunciation of the heteronym can be determined based on the frequency of occurrence of the n-gram determined at block 410. Referring back to the example speech input, “How's the weather in Nice?” the n-gram can be the trigram “weather in Nice” where the heteronym “Nice” in the trigram is associated with the proper noun and with the pronunciation /nis/. Based on the frequency of occurrence of the trigram “weather in Nice” (/nis/), it can be determined that the heteronym “Nice” in the speech input is most likely associated with the proper noun and the pronunciation /nis/. Accordingly, in this example, the correct pronunciation of the heteronym can be determined to be /nis/.

In some examples, the correct pronunciation of the heteronym can be determined based on both the frequency of occurrence of the n-gram and the frequency of occurrence of the second n-gram determined at block 410. For example, the correct pronunciation of the heteronym can be determined by comparing the frequency of occurrence of the n-gram to the frequency of occurrence of the second n-gram. Referring to the example where the n-gram is the trigram “weather in Nice” (/nis/) and the second n-gram is the trigram “weather in nice” /naIs/), the correct pronunciation of the heteronym “Nice” can be determined to be /nis/ based on the frequency of occurrence of the trigram “weather in Nice” being greater than the frequency of occurrence of the trigram “weather in nice” by at least a predetermined amount. In another example, the correct pronunciation of the heteronym “Nice” can be determined to be /nis/ based on the frequency of occurrence of the trigram “weather in Nice” (/nis/) being greater than a first predetermined threshold value and the frequency of occurrence of the trigram “weather in nice” /naIs/) being less than a second predetermined threshold value. In some examples, the first predetermined threshold value can be equal to the second predetermined threshold value. In other examples, the first predetermined threshold value can be greater than the second predetermined threshold value.

In some examples, the word context from the dialogue response can be utilized to disambiguate the heteronym. In these examples, the speech input need not include a heteronym. In one such example, the speech input can be “How's the weather in the fifth most populous city in France?” and the dialogue response can be “Here's the weather in Nice, France.” The dialogue response can then be processed using the ASR system to disambiguate the heteronym in the dialogue response and determine a correct pronunciation of the heteronym. For instance, in the above example, the dialogue response can include the trigram “weather in Nice.” Similar to the example described above, the frequency of occurrence of the trigram “weather in Nice” (/nis/) can be determined using the n-gram language model of the ASR system. Further, in some examples, the frequency of occurrence of the second trigram “weather in nice” /naIs/) can also be determined using the n-gram language model of the ASR system. Based on at least one of the frequency of occurrence of the trigram “weather in Nice” (/nis/) and the frequency of occurrence of the second 3-gram “weather in nice” /naIs/, the correct pronunciation of the heteronym “Nice” can be determined. In addition, the correct pronunciation of the heteronym “Nice” in the dialogue response can be determined by comparing, in a similar or identical manner as described above, the frequency of occurrence of the trigram “weather in Nice” (/nis/) to the frequency of occurrence of the second trigram “weather in nice” /naIs/.

Further, in some examples, the correct pronunciation of the heteronym can be determined using the natural language processor (e.g., natural language processing module 332) of the digital assistant. For example, the correct pronunciations of the heteronym can be determined based on the actionable intent determined at block 414. In these examples, the dialogue response can include the heteronym while the speech input need not include the heteronym. The correct pronunciation can be determined based on the relationship between the heteronym and the words, phrases, and parameters associated with the actionable intent. In a specific example where the speech input is “Find me directions to Nice,” and the actionable intent can be determined to be “map directions.” In this example, the task of mapping directions can be more closely related to the location “Nice” (/nis/) rather than to the adjective “nice” (/naIs/). Accordingly, it can be determined based on the actionable intent of “map directions” that the correct pronunciation of the heteronym “Nice” is /nis/.

In some examples, the correct pronunciation of the heteronym can be determined based on a parameter of the actionable intent. As described above, the heteronym can be assigned to a parameter of the actionable intent. For instance, continuing with the example speech input, “Find me directions to Nice,” the actionable intent can be “map directions” and the heteronym “Nice” can be assigned to the parameter {destination location} of the actionable intent. In this example, the parameter {destination location} can be more closely associated with the proper noun “Nice” (/nis/) than the adjective “nice” (/naIs/). Accordingly, it can be determined based on the parameter {destination location} that the correct pronunciation of the heteronym “Nice” is /nis/.

As described above, a vocabulary list can be associated with the actionable intent or a parameter of the actionable intent. The heteronym can be included in the vocabulary list. In some examples, the correct pronunciation of the heteronym can be determined based on the particular pronunciation associated with the heteronym in the vocabulary list. Referring back to the example where the actionable intent is determined to be “report weather,” a vocabulary list can be associated with the parameter {location} of the actionable intent “report weather.” In this example, the heteronym “Nice” can be included in the vocabulary list and the pronunciation /nis/ can be associated with the heteronym “Nice” in the vocabulary list. By using the vocabulary list as a knowledge base to disambiguate the heteronym, it can be determined that the correct pronunciation of the heteronym “Nice” is /nis/.

In some examples, the contextual information received at block 404 can be used to determine the correct pronunciation of the heteronym. Contextual information can be particularly useful in disambiguating heteronyms that are semantically similar or having the same parts of speech. In one example, the speech input can be “How are the Ajax doing?” In this example, Ajax is a heteronym that can refer to the Dutch soccer team (pronounced /'aI.æks/) or the mythological Greek hero (pronounced /'eI.d₃æks/)—both of which are proper nouns. In this example, contextual information can be useful to disambiguate the meaning and pronunciation of the heteronym “Ajax”. For example, the contextual information can include the current location of the user based on information received from the positioning system of the electronic device. The contextual information can indicated that the user is currently located in the city of Amsterdam, The Netherlands. Based on this contextual information, it can be determined that the heteronym “Ajax” likely refers to the Dutch football team (/'aI.æks/) rather than the mythological Greek hero (/'eI.d₃æks/) Accordingly, the correct pronunciation of the heteronym “Ajax” with respect to the speech input can be determined to be /'aI.æks/)

In some examples, the contextual information used to determine the correct pronunciation of the heteronym can include information associated with the user, such as, for example, geographic origin, nationality, or ethnicity. In one such example, the user can be identified to be Dutch based on contextual information received from the user's profile stored on the device. In such an example, the correct pronunciation of the heteronym “Ajax” can be determined to be /'aI.æks/ rather than /'eI.d₃æks/.

Further, in some examples, the correct pronunciation of the heteronym can be determined based on a custom pronunciation of the heteronym that is associated with the user. In particular, the custom pronunciation can be created based on a previous speech input received from the user. This can be desirable for proper nouns that may not abide by canonical pronunciations. For example, in a previous speech input received from a particular user, the heteronym “Ajax” can be pronounced as /'aI.æks/. This pronunciation can be stored as a custom pronunciation of the heteronym “Ajax” and associated with the particular user. In subsequent speech interactions associated with the particular user, the correct pronunciation of the heteronym “Ajax” can then be determined to be /'aI.æks/ based on the custom pronunciation of the heteronym “Ajax” that is associated with the particular user.

It should be recognized that the correct pronunciation of the heteronym can be determined based on any combination of the speech input, the n-gram language model, the natural language processor, and the contextual information. More specifically, the correct pronunciation of the heteronym can be based on any combination of the phonemic string determined at block 408, the frequency of occurrence of the n-gram, the actionable intent determined at block 414, and the contextual information received at block 404.

In some examples, there can be conflicting information regarding the correct pronunciation of the heteronym. For example, the user's pronunciation of the heteronym in the speech input can be inconsistent with the correct pronunciation of the heteronym determined based on the n-gram language model or the actionable intent. In these examples, predetermined logic (e.g., voting schemes, predetermined weighting, rules, etc.) can be applied to integrate the information provided by the speech input, the n-gram language model, the actionable intent, and the contextual information.

In the example where the speech input is “How's the weather in Nice?” the user can mispronounce the heteronym “Nice” (the proper noun) as /naIs/ and thus the phonemic string determined at block 408 can correspond to the pronunciation /naIs/. In addition, based on the frequency of occurrence of the trigram “weather in Nice” (/nis/) being greater than the frequency of occurrence of the trigram “weather in nice” (/naIs/), it can be determined that the heteronym “Nice” is more likely associated with the pronunciation of /nis/ rather than /naIs/. In this example, the correct pronunciation can be determined to be consistent with the n-gram language model (e.g., /nis/) if the frequency of occurrence of the trigram “weather in Nice” (/nis/) is greater than a predetermined threshold value or if the frequency of occurrence of the trigram “weather in Nice” (/nis/) is greater than the frequency of occurrence of the trigram “weather in nice” (/naIs/) by at least a predetermined amount. Conversely, if the frequency of occurrence of the trigram “weather in Nice” (/nis/) is not above a predetermined threshold value or if the frequency of occurrence of the trigram “weather in Nice” (/nis/) is not greater than the frequency of occurrence of the trigram “weather in nice” (/naIs/) by a predetermined amount, then the correct pronunciation of the heteronym “Nice” can be determined to be consistent with the phonemic string of block 408.

In some examples, upon determining the correct pronunciation of the heteronym, the heteronym in the dialogue response can be annotated (e.g., with a tag, token, label, and the like) with a unique identifier such that the annotation can be used to identify the correct pronunciation of the heteronym. In some examples, the dialogue response can be represented by a string of tokens and the token representing the heteronym can be uniquely associated with the correct pronunciation of the heteronym. Further, in some examples, the correct pronunciation of the heteronym can be stored in metadata associated with the heteronym in the dialogue response. The annotation of metadata can then be used at block 420 to synthesize the heteronym according to the correct pronunciation.

In some examples, a phonemic string corresponding to the correct pronunciation of the heteronym can be obtained from the ASR system based on the annotation identifying the correct pronunciation. For example, in the dialogue response, “Here's the weather in Nice, France between today and Saturday,” the heteronym “Nice” can be a represented by a token that identifies the heteronym as the proper noun rather than the adjective. Based on the token and using one or more acoustic models or language models of the ASR system, a phonemic string corresponding to the pronunciation /nis/ can be obtained. The obtained phonemic string can be stored in metadata associated with the heteronym in the dialogue response. The obtained phonemic string can then be used at block 420 to synthesize the heteronym according to the correct pronunciation.

In examples where the correct pronunciation of the heteronym is determined to be consistent with the phonemic string of block 408, the phonemic string of block 408 can be directly stored in metadata associated with the heteronym in the dialogue response. In these examples, the phonemic string at block 420 can be used to synthesize the heteronym according to the correct pronunciation.

At block 420 of process 400, the dialogue response can be output as a speech output. The heteronym in the dialogue response can be pronounced in the speech output according to the correct pronunciation determined at block 418. In some examples, the dialogue response can be output using a speech synthesizer (e.g., speech synthesis module 340) of the digital assistant. Specifically, the heteronym in the dialogue response can be synthesized by the speech synthesizer according to the determined correct pronunciation.

In some examples, the heteronym in the dialogue response can be synthesized at a word level. In these examples, the speech synthesizer can be configured with a dictionary that includes multiple entries for each heteronym. For example, the dictionary can include an entry for “Nice” corresponding to the pronunciation /nis/ and another entry for “nice” corresponding to the pronunciation /naIs/. In some examples, the speech synthesizer can synthesize the heteronym at a word level based on its annotation (e.g., tag, label, token, and the like) or associated metadata to output the heteronym in speech form according to the correct pronunciation. For example, if the token representing the heteronym “Nice” identifies the heteronym as being the correct noun having the pronunciation /nis/ rather than the adjective having the pronunciation /naIs/, then the speech synthesizer can synthesize the heteronym based on the token and using the dictionary entry in the speech synthesizer corresponding to the pronunciation /nis/. It should be recognized that the heteronym can be identified by various means such as metadata, tags, label, and the like and each of these means can be accessed and processed by the speech synthesizer to synthesize the heteronym at a word level using the appropriate dictionary entry.

In other examples, the heteronym in the dialogue response can be synthesized at a phoneme level. In these examples, the speech synthesizer can be configured to directly process phonemic strings and output speech according to the phonemic strings. As described above, a phonemic string corresponding to the correct pronunciation of the heteronym can be stored in metadata associated with the heteronym in the dialogue response. The phonemic string can be the phonemic string of block 408 or the separately obtained phonemic string described at block 416. In these examples, the phonemic string stored in the metadata can be accessed by the speech synthesizer and directly processed to output the heteronym in speech form. Because the stored phonemic strings are based on the determined correct pronunciation of the heteronym, synthesizing the phonemic string can result in the heteronym being pronounced in the speech output according to the correct pronunciation. Synthesizing the heteronym at a phoneme level can be desirable because it can eliminate the need for the speech synthesizer to have a dictionary with multiple entries for each heteronym, thereby reducing resource requirements.

Although in the examples above, the heteronym can be synthesized at the word level or the phonemic level, it should be recognized that various synthesis processes can be utilized to synthesize the heteronym such that it is pronounced in the speech output according to the correct pronunciation.

Although blocks 402 through 420 of process 400 are shown in a particular order in FIG. 4, it should be appreciated that these blocks can be performed in any order. For instance, in some examples, block 418 can be performed prior to block 416. Further, it should be appreciated that in some cases, one or more blocks of process 400 can be optional and additional blocks can also be performed. For instance, in some examples, one or more of blocks 408 through 412 within block 406 can be optional. Thus, processing the speech input using the ASR system at block 406 can include any combination of blocks 408, 410, and 412. In other examples, block 404 can be optional. In yet other examples, block 414 can be optional.

5. Electronic Device

FIG. 5 shows a functional block diagram of an electronic device 500 configured in accordance with the principles of the various described examples. The functional blocks of the device can be optionally implemented by hardware, software, or a combination of hardware and software to carry out the principles of the various described examples. It is understood by persons of skill in the art that the functional blocks described in FIG. 5 can be optionally combined or separated into sub-blocks to implement the principles of the various described examples. Therefore, the description herein optionally supports any possible combination, separation, or further definition of the functional blocks described herein.

As shown in FIG. 5, an electronic device 500 can include a touch screen display unit 502 configured to display a user interface and receive input from the user, an audio input unit 504 configured to receive speech input, a sensor unit 506 configured to provide contextual information from the user, a memory unit 508 configured to store contextual information, and a speaker unit 508 configured to output audio. In some examples, audio input unit 504 can be configured to receive a speech input in the form of sound waves from a user and transmit the speech input in the form of a representative signal to processing unit 510. The electronic device 500 can further include a processing unit 510 coupled to the touch screen display unit 502, the audio input unit 504, the sensor unit 506, and the speaker unit 508. In some examples, the processing unit 510 can include a receiving unit 512, a speech processing unit 514, a determining unit 518, a generating unit 520, an outputting unit 522, an assigning unit 524, an obtaining unit 526, and an annotating unit 528.

The processing unit 510 is configured to receive (e.g., from the audio input unit 504 and using the receiving unit 512), from a user, a speech input containing a heteronym and one or more additional words. The processing unit 510 is configured to process (e.g., using the speech processing unit 514) the speech input using an automatic speech recognition system to determine at least one of a phonemic string corresponding to the heteronym as pronounced by the user in the speech input and a frequency of occurrence of an n-gram with respect to a corpus. The n-gram includes the heteronym and the one or more additional words and the heteronym in the n-gram is associated with a first pronunciation. The processing unit 510 is configured to determine (e.g., using the determining unit 518) a correct pronunciation of the heteronym based on at least one of the phonemic string and the frequency of occurrence of the n-gram. The processing unit 510 is configured to generate (e.g., using the generating unit 520) a dialogue response to the speech input. The dialogue response includes the heteronym. The processing unit 510 is configured to output (e.g., using the speaker unit 508 and the outputting unit 522) the dialogue response as a speech output. The heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.

In some examples, the processing unit 510 is configured to determine (e.g., using speech processing unit 514) a text string corresponding to the speech input. In some examples, the processing unit 510 is configured to determine (e.g., using the determining unit 518) an actionable intent based on the text string. The correct pronunciation of the heteronym is determined based on at least one of the phonemic string, the frequency of occurrence of the n-gram, and the actionable intent.

In some examples, the processing unit 510 is configured to assign (e.g., using the assigning unit 524) the heteronym to a parameter of the actionable intent. The correct pronunciation of the heteronym is determined based at least in part on the parameter.

In some examples, a vocabulary list is associated with the actionable intent. The vocabulary list includes the heteronym and the heteronym in the vocabulary list is associated with a particular pronunciation. The correct pronunciation of the heteronym is determined based on the particular pronunciation associated with the heteronym in the vocabulary list.

In some examples, the processing unit 510 is configured to receive (e.g., from the sensor unit 506 or the memory unit 508 and using the receiving unit 512) contextual information associated with the speech input. The actionable intent is determined based at least in part on the contextual information.

In some examples, the processing unit 510 is configured to determine (e.g., using speech processing unit 514) a frequency of occurrence of a second n-gram with respect to the corpus. The second n-gram includes the heteronym and the one or more additional words. The heteronym in the second n-gram is associated with a second pronunciation. The correct pronunciation of the heteronym is determined based on the frequency of occurrence of the n-gram and the frequency of occurrence of the second n-gram.

In some examples, the frequency of occurrence of the n-gram is greater than the frequency of occurrence of the second n-gram by at least a predetermined amount, and the correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the frequency of occurrence of the first n-gram is greater than a first predetermined threshold value. The frequency of occurrence of the second n-gram is less than a second predetermined threshold value. The correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the phonemic string corresponds to the second pronunciation. The frequency of occurrence of the n-gram is greater than the frequency of occurrence of the second n-gram by at least a predetermined amount and the correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the processing unit 510 is configured to obtain (e.g., using the obtaining unit 526) from the automatic speech recognition system a second phonemic string corresponding to the determined correct pronunciation. In some examples, outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer. The speech synthesizer uses the second phonemic string to synthesize the heteronym in the speech output according to the correct pronunciation.

In some examples, the processing unit 510 is configured to annotate (e.g., using the annotating unit 528) the heteronym in the dialogue response with a tag to identify the correct pronunciation of the heteronym. In some examples, outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer. The heteronym in the dialogue response is synthesized based on the tag.

In some examples, the correct pronunciation of the heteronym is determined based at least in part on the contextual information. In some examples, the contextual information includes information associated with the user.

In some examples, the correct pronunciation of the heteronym is determined based at least in part on a custom pronunciation of the heteronym that is associated with the user. The custom pronunciation can be based on a previous speech input received from the user.

In some examples, the processing unit 510 is configured to receive (e.g., from the audio input unit 504 and using the receiving unit 512), from a user, a speech input containing a heteronym and one or more additional words. The processing unit 510 is configured to process (e.g., using the speech processing unit 514) the speech input using an automatic speech recognition system to determine a frequency of occurrence of a first n-gram with respect to a corpus and a frequency of occurrence of a second n-gram with respect to the corpus. The first n-gram includes the heteronym and the one or more additional words. The heteronym in the first n-gram is associated with a first pronunciation. The second n-gram includes the heteronym and the one or more additional words. The heteronym in the second n-gram is associated with a second pronunciation. The processing unit 510 is configured to determine (e.g., using the determining unit 518) a correct pronunciation of the heteronym based on the frequency of occurrence of the first n-gram and the frequency of occurrence of the second n-gram. The processing unit 510 is configured to generate (e.g., using the generating unit 520) a dialogue response to the speech input. The dialogue response includes the heteronym. The processing unit 510 is configured to output (e.g., using the speaker unit 508 and the outputting unit 522) the dialogue response as a speech output. The heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.

In some examples, the frequency of occurrence of the first n-gram is greater than the frequency of occurrence of the second n-gram by at least a predetermined amount and the correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the frequency of occurrence of the first n-gram is greater than a first predetermined threshold value. The frequency of occurrence of the second n-gram is less than a second predetermined threshold value. The correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the one or more additional words precede the heteronym in the speech input.

In some examples, the processing unit 510 is configured to receive (e.g., from the audio input unit 504 and using the receiving unit 512), from a user, a speech input. The processing unit 510 is configured to process (e.g., using the speech processing unit 514) the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input. The processing unit 510 is configured to determine (e.g., using the determining unit 518) an actionable intent based on the text string. The processing unit 510 is configured to generate (e.g., using the generating unit 520) a dialogue response to the speech input based on the actionable intent. The dialogue response includes the heteronym. The processing unit 510 is configured to determine (e.g., using the determining unit 518) a correct pronunciation of the heteronym using an n-gram language model of the automatic speech recognition system and based on the heteronym and one or more additional words in the dialogue response. The processing unit 510 is configured to output (e.g., using the speaker unit 508 and the outputting unit 522) the dialogue response as a speech output. The heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.

In some examples, the processing unit 510 is configured to determine (e.g., using the speech processing unit 514) a frequency of occurrence of a first n-gram with respect to a corpus. The first n-gram includes the heteronym and the one or more additional words in the dialogue response. The heteronym in the first n-gram is associated with a first pronunciation. In some examples, the processing unit 510 is configured to determine (e.g., using the speech processing unit 514) a frequency of occurrence of a second n-gram with respect to the corpus. The second n-gram includes the heteronym and the one or more additional words. The heteronym in the second n-gram is associated with a second pronunciation. The correct pronunciation of the heteronym in the dialogue response is determined based on the frequency of occurrence of the first n-gram and the frequency of occurrence of the second n-gram.

In some examples, the frequency of occurrence of the first n-gram is greater than the frequency of occurrence of the second n-gram by at least a predetermined amount and the correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the frequency of occurrence of the first n-gram is greater than a first predetermined threshold value, the frequency of occurrence of the second n-gram is less than a second predetermined threshold value, and the correct pronunciation of the heteronym is determined to be the first pronunciation.

In some examples, the one or more additional words precede the heteronym in the dialogue response. In some examples, the contextual information includes information associated with the user.

In some examples, the correct pronunciation of the heteronym is determined based at least in part on a custom pronunciation of the heteronym that is associated with the user. The custom pronunciation can be based on a previous speech input received from the user.

In some examples, the processing unit 510 is configured to receive (e.g., from the audio input unit 504 and using the receiving unit 512), from a user, a speech input. The processing unit 510 is configured to process (e.g., using the speech processing unit 514) the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input. The processing unit 510 is configured to determine (e.g., using the determining unit 518) an actionable intent based on the text string. The processing unit 510 is configured to generate (e.g., using the generating unit 520) a dialogue response to the speech input based on the actionable intent. The dialogue response includes the heteronym. The processing unit 510 is configured to determine (e.g., using the determining unit 518) a correct pronunciation of the heteronym based on the actionable intent. The processing unit 510 is configured to output (e.g., using the speaker unit 508 and the outputting unit 522) the dialogue response as a speech output. The heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.

In some examples, the processing unit 510 is configured to assign (e.g., using the assigning unit 524) the heteronym to a parameter of the actionable intent. The correct pronunciation of the heteronym is determined based on the parameter.

In some examples, a vocabulary list is associated with the actionable intent, the vocabulary list includes the heteronym, the heteronym in the vocabulary list is associated with a particular pronunciation, and the correct pronunciation of the heteronym is determined based on the particular pronunciation associated with the heteronym in the vocabulary list.

In some examples, the processing unit 510 is configured to receive (e.g., from the audio input unit 504 and using the receiving unit 512), from a user, a speech input containing a heteronym and one or more additional words. The processing unit 510 is configured to process (e.g., using the speech processing unit 514) the speech input using an automatic speech recognition system to determine a phonemic string corresponding to the heteronym as pronounced by the user in the speech input. The processing unit 510 is configured to generate (e.g., using the generating unit 520) a dialogue response to the speech input where the dialogue response includes the heteronym. The processing unit 510 is configured to output (e.g., using the speaker unit 508 and the outputting unit 522) the dialogue response as a speech output. The heteronym in the dialogue response is pronounced in the speech output according to the phonemic string.

In some examples, the phonemic string is determined using an acoustic model of the automatic speech recognition system. In some examples, outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer. The dialogue response is synthesized based on the phonemic string.

In some examples, the phonemic string is stored in metadata that is associated with the heteronym in the dialogue response. The metadata is accessed by the speech synthesizer to synthesize the heteronym in the dialogue response according to the phonemic string.

Although examples have been fully described with reference to the accompanying drawings, it is to be noted that various changes and modifications will become apparent to those skilled in the art. Such changes and modifications are to be understood as being included within the scope of the various examples as defined by the appended claims.

In some cases, the systems, processes, and devices described above can include the gathering and use of data (e.g., contextual information) available from various sources to improve the delivery to users of invitational content or any other content that may be of interest to them. The present disclosure contemplates that in some instances, this gathered data may include personal information data that uniquely identifies or can be used to contact or locate a specific person. Such personal information data can include demographic data, location-based data, telephone numbers, email addresses, home addresses, or any other identifying information.

The present disclosure recognizes that the use of such personal information data in connection with the systems, processes, and devices described above, can be used to the benefit of users. For example, the personal information data can be used to determine the correct pronunciation of a heteronym. Accordingly, use of such personal information data can enable heteronyms to be pronounced more accurately in speech outputs of the system, processes, and devices described above.

The present disclosure further contemplates that the entities responsible for the collection, analysis, disclosure, transfer, storage, or other use of such personal information data will comply with well-established privacy policies and/or privacy practices. In particular, such entities should implement and consistently use privacy policies and practices that are generally recognized as meeting or exceeding industry or governmental requirements for maintaining personal information data, private and secure. For example, personal information from users should be collected for legitimate and reasonable uses of the entity and not shared or sold outside of those legitimate uses. Further, such collection should occur only after receiving the informed consent of the users. Additionally, such entities would take any needed steps for safeguarding and securing access to such personal information data and ensuring that others with access to the personal information data adhere to their privacy policies and procedures. Further, such entities can subject themselves to evaluation by third parties to certify their adherence to widely accepted privacy policies and practices.

Despite the foregoing, the present disclosure also contemplates examples in which users selectively block the use of, or access to, personal information data. That is, the present disclosure contemplates that hardware and/or software elements can be provided to prevent or block access to such personal information data. For example, in the case of advertisement delivery services, the systems and devices described above can be configured to allow users to select to “opt in” or “opt out” of participation in the collection of personal information data during registration for services. In another example, users can select not to provide location information for targeted content delivery services. In yet another example, users can select to not provide precise location information, but permit the transfer of location zone information.

Therefore, although the present disclosure broadly covers use of personal information data to implement one or more various disclosed examples, the present disclosure also contemplates that the various examples can also be implemented without the need for accessing such personal information data. That is, the various examples disclosed herein are not rendered inoperable due to the lack of all or a portion of such personal information data. For example, the correct pronunciation of a heteronym can be determined based on non-personal information data or a bare minimum amount of personal information, such as the content being requested by the device associated with a user, other non-personal information available to the content delivery services, or publicly available information. 

What is claimed is:
 1. A method for operating an intelligent automated assistant, the method comprising: at an electronic device with a processor and memory storing one or more programs for execution by the processor: receiving, from a user, a speech input containing a heteronym and one or more additional words; processing the speech input using an automatic speech recognition system to determine at least one of: a phonemic string corresponding to the heteronym as pronounced by the user in the speech input; and a frequency of occurrence of an n-gram with respect to a corpus, wherein the n-gram includes the heteronym and the one or more additional words; determining a correct pronunciation of the heteronym based on at least one of the phonemic string and the frequency of occurrence of the n-gram; generating a dialogue response to the speech input, wherein the dialogue response includes the heteronym; and outputting the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.
 2. The method of claim 1, wherein processing the speech input using the automatic speech recognition system includes determining a text string corresponding to the speech input, and further comprising: determining an actionable intent based on the text string, wherein the correct pronunciation of the heteronym is determined based on at least one of the phonemic string, the frequency of occurrence of the n-gram, and the actionable intent.
 3. The method of claim 2, further comprising: assigning the heteronym to a parameter of the actionable intent, wherein the correct pronunciation of the heteronym is determined based at least in part on the parameter.
 4. The method of claim 2, wherein: a vocabulary list is associated with the actionable intent; the vocabulary list includes the heteronym; the heteronym in the vocabulary list is associated with a particular pronunciation; and the correct pronunciation of the heteronym is determined based on the particular pronunciation associated with the heteronym in the vocabulary list.
 5. The method of claim 2, further comprising: receiving contextual information associated with the speech input, wherein the actionable intent is determined based at least in part on the contextual information.
 6. The method of claim 1, wherein: the heteronym in the n-gram is associated with a first pronunciation; processing the speech input using the automatic speech recognition system includes determining a frequency of occurrence of a second n-gram with respect to the corpus; the second n-gram includes the heteronym and the one or more additional words; the heteronym in the second n-gram is associated with a second pronunciation; and the correct pronunciation of the heteronym is determined based on the frequency of occurrence of the n-gram and the frequency of occurrence of the second n-gram.
 7. The method of claim 6, wherein the frequency of occurrence of the n-gram is greater than the frequency of occurrence of the second n-gram by at least a predetermined amount, and wherein the correct pronunciation of the heteronym is determined to be the first pronunciation.
 8. The method of claim 6, wherein the frequency of occurrence of the first n-gram is greater than a first predetermined threshold value, wherein the frequency of occurrence of the second n-gram is less than a second predetermined threshold value, and wherein the correct pronunciation of the heteronym is determined to be the first pronunciation.
 9. The method of claim 6, wherein the phonemic string corresponds to the second pronunciation, wherein the frequency of occurrence of the n-gram is greater than the frequency of occurrence of the second n-gram by at least a predetermined amount, and wherein the correct pronunciation of the heteronym is determined to be the first pronunciation.
 10. The method of claim 1, further comprising: obtaining from the automatic speech recognition system a second phonemic string corresponding to the determined correct pronunciation, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the speech synthesizer uses the second phonemic string to synthesize the heteronym in the speech output according to the correct pronunciation.
 11. The method of claim 1, further comprising: annotating the heteronym in the dialogue response with a tag to identify the correct pronunciation of the heteronym, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the heteronym in the dialogue response is synthesized based on the tag.
 12. The method of claim 1, further comprising: receiving contextual information associated with the speech input, wherein the correct pronunciation of the heteronym is determined based at least in part on the contextual information.
 13. The method of claim 1, wherein the correct pronunciation of the heteronym is determined based at least in part on a custom pronunciation of the heteronym that is associated with the user, and wherein the custom pronunciation is based on a previous speech input received from the user.
 14. A method for operating an intelligent automated assistant, the method comprising: at an electronic device with a processor and memory storing one or more programs for execution by the processor: receiving, from a user, a speech input; processing the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input; determining an actionable intent based on the text string; generating a dialogue response to the speech input based on the actionable intent, wherein the dialogue response includes a heteronym; determining a correct pronunciation of the heteronym using an n-gram language model of the automatic speech recognition system and based on the heteronym and one or more additional words in the dialogue response; and outputting the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.
 15. The method of claim 14, wherein the one or more additional words precede the heteronym in the dialogue response.
 16. The method of claim 14, further comprising: obtaining from the automatic speech recognition system a phonemic string corresponding to the determined correct pronunciation, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the speech synthesizer uses the phonemic string to synthesize the heteronym in the speech output according to the determined correct pronunciation.
 17. The method of claim 14, further comprising: annotating the heteronym in the dialogue response with a tag to identify the correct pronunciation of the heteronym, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the heteronym in the dialogue response is synthesized based on the tag.
 18. The method of claim 14, further comprising: receiving contextual information associated with the speech input, wherein the correct pronunciation of the heteronym is determined based at least in part on the contextual information.
 19. The method of claim 14, wherein the correct pronunciation of the heteronym is determined based at least in part on a custom pronunciation of the heteronym that is associated with the user, and wherein the custom pronunciation is based on a previous speech input received from the user.
 20. A method for operating an intelligent automated assistant, the method comprising: at an electronic device with a processor and memory storing one or more programs for execution by the processor: receiving, from a user, a speech input containing a heteronym and one or more additional words; processing the speech input using an automatic speech recognition system to determine a phonemic string corresponding to the heteronym as pronounced by the user in the speech input; generating a dialogue response to the speech input, wherein the dialogue response includes the heteronym; and outputting the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the phonemic string.
 21. The method of claim 20, wherein the phonemic string is determined using an acoustic model of the automatic speech recognition system.
 22. The method of claim 20, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the dialogue response is synthesized based on the phonemic string.
 23. The method of claim 20, wherein the phonemic string is stored in metadata that is associated with the heteronym in the dialogue response, and wherein the metadata is accessed by the speech synthesize to synthesize the heteronym in the dialogue response according to the phonemic string.
 24. A non-transitory computer-readable storage medium comprising instructions for causing one or more processors to: receive, from a user, a speech input containing a heteronym and one or more additional words; process the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input, wherein processing the speech input includes determining at least one of: a phonemic string corresponding to the heteronym as pronounced by the user in the speech input; and a frequency of occurrence of an n-gram with respect to a corpus, wherein the n-gram includes the heteronym and the one or more additional words; determine an actionable intent based on the text string; determine a correct pronunciation of the heteronym based on at least one of the phonemic string, the frequency of occurrence of the n-gram, and the actionable intent; generate a dialogue response to the speech input, wherein the dialogue response includes the heteronym; and output the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.
 25. An electronic device comprising: one or more processors; memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for: receiving, from a user, a speech input containing a heteronym and one or more additional words; processing the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input, wherein processing the speech input includes determining at least one of: a phonemic string corresponding to the heteronym as pronounced by the user in the speech input; and a frequency of occurrence of an n-gram with respect to a corpus, wherein the n-gram includes the heteronym and the one or more additional words; determining an actionable intent based on the text string; determining a correct pronunciation of the heteronym based on at least one of the phonemic string, the frequency of occurrence of the n-gram, and the actionable intent; generating a dialogue response to the speech input, wherein the dialogue response includes the heteronym; and outputting the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.
 26. The computer-readable storage medium of claim 24, wherein processing the speech input using the automatic speech recognition system includes determining a text string corresponding to the speech input, and further comprising instructions for causing the one or more processors to: determine an actionable intent based on the text string, wherein the correct pronunciation of the heteronym is determined based on at least one of the phonemic string, the frequency of occurrence of the n-gram, and the actionable intent.
 27. The computer-readable storage medium of claim 26, further comprising instructions for causing the one or more processors to: assign the heteronym to a parameter of the actionable intent, wherein the correct pronunciation of the heteronym is determined based at least in part on the parameter.
 28. The computer-readable storage medium of claim 26, wherein: a vocabulary list is associated with the actionable intent; the vocabulary list includes the heteronym; the heteronym in the vocabulary list is associated with a particular pronunciation; and the correct pronunciation of the heteronym is determined based on the particular pronunciation associated with the heteronym in the vocabulary list.
 29. The computer-readable storage medium of claim 24, wherein: the heteronym in the n-gram is associated with a first pronunciation; processing the speech input using the automatic speech recognition system includes determining a frequency of occurrence of a second n-gram with respect to the corpus; the second n-gram includes the heteronym and the one or more additional words; the heteronym in the second n-gram is associated with a second pronunciation; and the correct pronunciation of the heteronym is determined based on the frequency of occurrence of the n-gram and the frequency of occurrence of the second n-gram.
 30. The computer-readable storage medium of claim 24, further comprising instructions for causing the one or more processors to: receive contextual information associated with the speech input, wherein the correct pronunciation of the heteronym is determined based at least in part on the contextual information.
 31. The device of claim 25, wherein processing the speech input using the automatic speech recognition system includes determining a text string corresponding to the speech input, and wherein the one or more programs further include instructions for: determining an actionable intent based on the text string, wherein the correct pronunciation of the heteronym is determined based on at least one of the phonemic string, the frequency of occurrence of the n-gram, and the actionable intent.
 32. The device of claim 31, wherein the one or more programs further include instructions for: assigning the heteronym to a parameter of the actionable intent, wherein the correct pronunciation of the heteronym is determined based at least in part on the parameter.
 33. The device of claim 31, wherein: a vocabulary list is associated with the actionable intent; the vocabulary list includes the heteronym; the heteronym in the vocabulary list is associated with a particular pronunciation; and the correct pronunciation of the heteronym is determined based on the particular pronunciation associated with the heteronym in the vocabulary list.
 34. The device of claim 25, wherein: the heteronym in the n-gram is associated with a first pronunciation; processing the speech input using the automatic speech recognition system includes determining a frequency of occurrence of a second n-gram with respect to the corpus; the second n-gram includes the heteronym and the one or more additional words; the heteronym in the second n-gram is associated with a second pronunciation; and the correct pronunciation of the heteronym is determined based on the frequency of occurrence of the n-gram and the frequency of occurrence of the second n-gram.
 35. The device of claim 25, wherein the one or more programs further include instructions for: receiving contextual information associated with the speech input, wherein the correct pronunciation of the heteronym is determined based at least in part on the contextual information.
 36. A non-transitory computer-readable storage medium comprising instructions for causing one or more processors to: receive, from a user, a speech input; process the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input; determine an actionable intent based on the text string; generate a dialogue response to the speech input based on the actionable intent, wherein the dialogue response includes a heteronym; determine a correct pronunciation of the heteronym using an n-gram language model of the automatic speech recognition system and based on the heteronym and one or more additional words in the dialogue response; and output the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.
 37. An electronic device comprising: one or more processors; memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for: receiving, from a user, a speech input; processing the speech input using an automatic speech recognition system to determine a text string corresponding to the speech input; determining an actionable intent based on the text string; generating a dialogue response to the speech input based on the actionable intent, wherein the dialogue response includes a heteronym; determining a correct pronunciation of the heteronym using an n-gram language model of the automatic speech recognition system and based on the heteronym and one or more additional words in the dialogue response; and outputting the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the determined correct pronunciation.
 38. A non-transitory computer-readable storage medium comprising instructions for causing one or more processors to: receive, from a user, a speech input containing a heteronym and one or more additional words; process the speech input using an automatic speech recognition system to determine a phonemic string corresponding to the heteronym as pronounced by the user in the speech input; generate a dialogue response to the speech input, wherein the dialogue response includes the heteronym; and output the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the phonemic string.
 39. The computer-readable storage medium of claim 38, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the dialogue response is synthesized based on the phonemic string.
 40. An electronic device comprising: one or more processors; memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for: receiving, from a user, a speech input containing a heteronym and one or more additional words; processing the speech input using an automatic speech recognition system to determine a phonemic string corresponding to the heteronym as pronounced by the user in the speech input; generating a dialogue response to the speech input, wherein the dialogue response includes the heteronym; and outputting the dialogue response as a speech output, wherein the heteronym in the dialogue response is pronounced in the speech output according to the phonemic string.
 41. The device of claim 40, wherein outputting the dialogue response includes synthesizing the heteronym in the dialogue response using a speech synthesizer, and wherein the dialogue response is synthesized based on the phonemic string. 